<html>

<script>

function  test(num){
     return new Promise((resovle)=>{
          resovle(num+1000); 
       })
      
 }

async function am(){
      let num = await test(500);
      console.log(num);
      return num;    
}
console.log(am());

</script>
</html>
